<?php
namespace App\Controller;
use Think\Controller;
class VideoController extends Controller {
    public function index(){

    }
    public function videojson(){
    	//薛烜做的获取视频详细信息8.24
      
        $data = M('video');
        $videoid = $_GET['videoid'];
       
        //$d=$data->join('yuejian_coach on yuejian_coach.coachid = yuejian_video.coachid')->field('yuejian_video.*,yuejian_coach.coachname')->select();

        $d=$data->join('yuejian_coach on yuejian_coach.coachid = yuejian_video.coachid')->field('yuejian_video.*,yuejian_coach.coachname')->where("videoid='$videoid'")->select(); 

            var_dump($d);
            echo json_encode($d);	
    }


    public function videojson1(){
        //薛烜做的获取视频列表信息8.24
         
            $data = M('video');

            $s=$data->field('yuejian_video.videoname,yuejian_video.videoaddress')->select(); 

            var_dump($s);
            echo json_encode($s);
            
        }

}